package com.danci.controller;


import com.danci.common.Result;
import com.danci.dto.UserRequest;
import com.danci.service.ISignService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 签到表 前端控制器
 * </p>
 *
 * @author xxx
 * @since 2024-05-13
 */
@RestController
@RequestMapping("/sign")
@AllArgsConstructor
@Api("签到")
public class SignController {

    private final ISignService signService;


    @ApiOperation("签到")
    @PostMapping("/sign")
    public Result sign(@RequestBody UserRequest userRequest) {
        return signService.sign(userRequest);
    }

    @ApiOperation("获取签到状态、待学习、待复习单词数")
    @PostMapping("/getSignStatus")
    public Result getSignStatus(@RequestBody UserRequest userRequest) {
        return signService.getSignStatus(userRequest);
    }
}
